/*
 * @Author: Kevin Zhao
 * @Date: 2021-08-03 22:42:41
 * @LastEditTime: 2021-12-11 15:30:35
 * @LastEditors: Kevin Zhao
 * @Description: 支付api
 * @FilePath: \uniapp-pro\src\api\pay.ts
 */
import request from '../server/request'
import { sessionIdInterface } from './config/interface'
import { BizType } from '../api/config/enums'

interface payInterface extends sessionIdInterface {
    payType: string,
    bizType: BizType,
    price: number | string, 
    amount: number | string,
    payMethod: number | string,
    bizCode: string,
    bizName: string,
    addressId: string,
    openId: string,
    bizInfo?: string
}
/**
 * @description: 支付接口
 * @param {payInterface} params
 * @return {*}
 */
export const createPayAPI  = (params: payInterface):any => {
    return request(params, 'createPay')
}